const TokenKey = 'loginToken'
const UuidKey = 'userUuid'
const UserTypeKey = 'userType'
const LoginPathKey = 'loginPath'
const FirmKey = 'firm'
const RoutesKey = 'routesRefresh'
const MenuKey = 'userMenu'
const RoleKey = 'userRole'
const ActionKey = 'userAction'
const CompanySnKey = 'companySn'
const StrategyKey = 'strategy'

/**
 * 存 删 查 用户token
 */
export function getRoutesRefresh() {
  return localStorage.getItem(RoutesKey)
}

export function setRoutesRefresh() {
  return localStorage.setItem(RoutesKey,true)
}

export function removeRoutesRefresh() {
  return localStorage.removeItem(RoutesKey)
}

/**
 *  存 删 查 策略信息
 */
export function getStrategy() {
  return localStorage.getItem(StrategyKey)
}

export function setStrategy(strategy) {
  return localStorage.setItem(StrategyKey,strategy)
}

export function removeStrategy() {
  return localStorage.removeItem(StrategyKey)
}

/**
 * 存 删 查 用户token
 */
export function getToken() {
  return localStorage.getItem(TokenKey)
}

export function setToken(token) {
  return localStorage.setItem(TokenKey, token)
}

export function removeToken() {
  return localStorage.removeItem(TokenKey)
}

/**
 * 存 删 查 用户id
 */
export function getUuid() {
  return localStorage.getItem(UuidKey)
}

export function setUuid(Uuid) {
  return localStorage.setItem(UuidKey,Uuid)
}

export function removeUuid() {
  return localStorage.removeItem(UuidKey)
}

/**
 * 存 删 查 用户类型
 */
export function getUserType() {
  return localStorage.getItem(UserTypeKey)
}

export function setUserType(userType) {
  return localStorage.setItem(UserTypeKey,userType)
}

export function removeUserType() {
  return localStorage.removeItem(UserTypeKey)
}

/**
 * 存 删 查 登录路径
 */
export function getLoginPath() {
  return localStorage.getItem(LoginPathKey)
}

export function setLoginPath(loginPath) {
  return localStorage.setItem(LoginPathKey,loginPath)
}

export function removeLoginPath() {
  return localStorage.removeItem(LoginPathKey)
}

/**
 * 存 删 查 企业ID
 */
export function getFirm() {
  return localStorage.getItem(FirmKey)
}

export function setFirm(firm) {
  return localStorage.setItem(FirmKey,firm)
}

export function removeFirm() {
  return localStorage.removeItem(FirmKey)
}

/**
 * 存 删 查 用户可访问路由
 */
export function getUserMenu() {
  return localStorage.getItem(MenuKey)
}

export function setUserMenu(menu) {
  return localStorage.setItem(MenuKey,menu)
}

export function removeUserMenu() {
  return localStorage.removeItem(MenuKey)
}

/**
 * 存 删 查 用户角色
 */
export function getUserRole() {
  return localStorage.getItem(RoleKey)
}

export function setUserRole(role) {
  return localStorage.setItem(RoleKey,role)
}

export function removeUserRole() {
  return localStorage.removeItem(RoleKey)
}

/**
 * 存 删 查 用户操作
 */

export function getUserAction() {
  return localStorage.getItem(ActionKey)
}

export function setUserAction(action) {
  return localStorage.setItem(ActionKey,action)
}

export function removeUserAction() {
  return localStorage.removeItem(ActionKey)
}

/**
 * 存 删 查 公司编号
 */

export function getCompanySn() {
  return localStorage.getItem(CompanySnKey)
}

export function setCompanySn(sn) {
  return localStorage.setItem(CompanySnKey,sn)
}

export function removeCompanySn() {
  return localStorage.removeItem(CompanySnKey)
}